package cn.wdm.ymcc.feign;

import cn.wdm.ymcc.domain.MessageEmail;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class SendEmailFeignClientFallBackFactory implements FallbackFactory<SendEmailFeignClient> {
    @Override
    public SendEmailFeignClient create(Throwable throwable) {
        return new SendEmailFeignClient() {
            @Override
            public Boolean sendMsg(MessageEmail messageEmail) {
                return false;
            }
        };
    }
}
